﻿#pragma once

#include "ais_box.h"
#include "topo/topo_base.h"

namespace CAGD
{

/**
 * 交互曲面.
 */
class AIS_Surface : public AIS_Base
{
  public:
    /**
     * @brief 基本构造.
     * @param surface
     * @see
     */
    AIS_Surface(Handle(GeomSurface) surface);

    /**
     * @brief 基本构造.
     * @param face
     * @see
     */
    AIS_Surface(Handle(TopoFace) face);

    /**
     * @brief 刷新顶点数据.
     * @see
     */
    void UpdateArray() override;

    /**
     * @brief 检测函数.
     * @return
     * @param pos
     * @see
     */
    bool MoveTo(Point pos) override;

    /**
     * @brief 刷新信息.
     * @return
     * @see
     */
    void UpdateInfo() override;

    /**
     * @brief 获得类型.
     * @return
     * @see
     */
    AIS_Type GetType() const override;

    /**
     * @brief 获得三角网格.
     * @return
     * @see
     */
    Handle(TriangleMesh) GetMesh() const;

    /**
     * @brief 获得曲面.
     * @return
     * @see
     */
    Handle(GeomSurface) GetSurface() const;

    /**
     * @brief 获得 face.
     * @return
     * @see
     */
    Handle(TopoFace) GetFace() const;

  protected:
    Handle(TopoFace) m_face;
    Handle(TriangleMesh) m_mesh;
};

} // namespace CAGD
